<?php

namespace App\Http\Controllers\Backstage\Push;

use App\Http\Controllers\BaseController;
use App\Models\Company\Archive;
use App\Models\GenerateUrl;
use App\Models\PushUrl;
use App\Transformers\Company\ArchiveTransformer;
use App\Transformers\GenTransformer;
use App\Transformers\PushTransformer;
use Illuminate\Http\Request;

class PushController extends BaseController
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $page_size = get_request_page();
        $push = PushUrl::orderBy('status', 'desc')->paginate($page_size);
        return $this->response->paginator($push, new PushTransformer());
    }

    public function getFile()
    {
        $page_size = get_request_page();
        $push = GenerateUrl::paginate($page_size);
        return $this->response->paginator($push, new GenTransformer());
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  int $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }
}
